<?php
require_once('../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/local/itusurveyplugin/lib.php');
require_once($CFG->dirroot . "/local/itusurveyplugin/forms.php");

//Require authentication and authorization
require_login($SITE);
require_capability('local/itusurveyplugin:viewbenchmark', context_system::instance());

//$id = required_param('id', PARAM_TEXT);
//echo"<script>alert('".$id_qt."')</script>";
//prepare moodle_url
global $DB; 
$path = $CFG->wwwroot.'/local/itusurveyplugin/itusurveyreport/benchmark.php';

//Load custom fields
//$load = optional_param('load', null, PARAM_TEXT);

/* Chuan bi trang web can hien thi */	
$url = new moodle_url($path);
$PAGE->set_url($url);
$PAGE->set_title('ITU Survey Benchmark');
$PAGE->set_heading('ITU Survey Benchmark');
$PAGE->set_pagelayout('standard');

navigation_node::override_active_url(new moodle_url($path, array('param'=>'value')));

echo $OUTPUT->header();
//Include functions
$mylib = new statistic_management();
//New form instance
$mform = new form_benchmark_survey(null, null);
$mform->display();

//cancel action
if ($mform->is_cancelled()) {

}
if ($fromform = $mform->get_data()) 
{
}
//Invalid Received Data or First Load
else{
    
//    Set default data (if any)
//    $mform->set_data($toform);
//    Used for first load	    
}
echo $OUTPUT->footer();    
?>